home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagg_m.zip / GRAPHICS.SWG / 0032_Simple & QUICK Graphics.pas < prev    next >
Pascal/Delphi Source File  |  1993-11-02  |  940b  |  63 lines

  1. { STEVE BOUTILIER }
  2.  
  3. Uses
  4.   Dos,
  5.   Crt;
  6.  
  7. Procedure OpenGraphics; Assembler;
  8. Asm
  9.   Mov Ah, 00h
  10.   Mov Al, 13h
  11.   Int $10
  12. end;
  13.  
  14. Procedure CloseGraphics; Assembler;
  15. Asm
  16.   Mov Ah, 00h
  17.   Mov Al, 03h
  18.   Int $10
  19. end;
  20.  
  21. Procedure PutXY(X, Y : Byte); Assembler;
  22. Asm
  23.   Mov Ah, 02h
  24.   Mov Dh, Y - 1
  25.   Mov Dl, X - 1
  26.   Mov Bh, 0
  27.   Int $10
  28. end;
  29.  
  30. Procedure OutChar(S : Char; Col : Byte); Assembler;
  31. Asm
  32.   Mov Ah, 0Eh
  33.   Mov Al, S
  34.   Mov Bh, 0
  35.   Mov Bl, Col
  36.   Int $10
  37. end;
  38.  
  39. Procedure OutString(S : String; Col : Byte);
  40. Var
  41.  I  : Integer;
  42.  Ch : Char;
  43. begin
  44.   For I := 1 to Length(s) do
  45.   begin
  46.    Ch := S[I];
  47.    OutChar(Ch, Col);
  48.   end;
  49. end;
  50.  
  51. begin
  52.   OpenGraphics;
  53.   OutString('HELLO WORLD!' + #13#10, 14);
  54.   Repeat Until KeyPressed;
  55.   CloseGraphics;
  56. end.
  57.  
  58. {
  59. BTW: This code is Public Domain! Do what you want With it! most of you
  60.      probably already have routines that are even better than this.
  61. }
  62.  
  63.